]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Fix date conversion
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 2 Mar 2020 12:46:04 +0000 (13:46 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 2 Mar 2020 12:54:23 +0000 (13:54 +0100)
This is a regression from commit 06b690ff21204:

GLib.DateTime.new() expects the full four-digit year, so passing
the abbreviated year from Date() will result in a bogus datetime.

Today is *not* Saturday March 2nd, 120 ...

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1061

js/ui/environment.js

index 8ab9e7d444cdd515a6d4d29126989623bda5221e..0450f79328b338617f87e82b16e53622b3aa7289 100644 (file)
@@ -320,7 +320,7 @@ function init() {
             _localTimeZone = GLib.TimeZone.new_local();
 
         let dt = GLib.DateTime.new(_localTimeZone,
-            this.getYear(),
+            this.getFullYear(),
             this.getMonth() + 1,
             this.getDate(),
             this.getHours(),